var bulicUrl = "/productHT/action/";
var map1 = new Map();
map1.set("0", "全部学生");
map1.set("1", "黑龙江省全日制大专");
map1.set("2", "成人教育");
map1.set("3", "自学考试");
map1.set("4", "计算机");
map1.set("5", "远程教育");
map1.set("6", "资格证书");
map1.set("7", "职称证书");
map1.set("8", "研究生");
map1.set("9", "医学");
map1.set("10", "国家开放大学");
map1.set("11", "省外全日制大专");
map1.set("12", "中专学历");
//添加学生信息页面map1
function map1Function(){
	html=""
	htmlleft=""
	map1.forEach(function(item,index,arr){　
	    html+='<option value="'+index+'">'+item+'</option>';
	    htmlleft+='<dd><a data-url="page/main.html" onclick="condition(this,'+index+');" class="text-center">'+item+'</a></dd>';
	});　
	 $(".educationType").html(html);
	 $(".educationTypehtmlleft").html(htmlleft);
}
/*根据map1用数字获取文字*/
function mapWrite(num){
	var write;
	map1.forEach(function(item,index,arr){
	    if(num==index){
	    	write=item;
	    }
	});
	return write;
}
var map2 = new Map();
map2.set("0", "未缴费");
map2.set("1", "已缴费");

var map3 = new Map();
map3.set("1", "已提交");
map3.set("0", "未提交");


var map4 = new Map();
map4.set("1", "已报名");
map4.set("0", "未报名");

var map5 = new Map();
map5.set("1", "教育机构");
map5.set("2", "中专学校");
map5.set("3", "大专学校");
/*成人页面需要*/
var map6 = new Map();
map6.set("0", "请选择");
map6.set("1", "成人教育");
map6.set("2", "自学考试");
map6.set("3", "网络教育");
map6.set("4", "研究生");
/*成人页面需要 主页也需要*/
var map7 = new Map();
map7.set("0", "请选择");
map7.set("1", "高起专");
map7.set("2", "专升本");
map7.set("3", "高起本");
map7.set("4", "研究生");
map7.set("5", "二学历");
map7.set("6", "中专");



//添加学生信息页面map7
function map7Function(){
	html=""
	map7.forEach(function(item,index,arr){　
	    html+='<option value="'+index+'">'+item+'</option>';
	    
	});　
	 $("#cengci").html(html);
	
}
/*根据map7用数字获取文字*/
function map7Write(num){
	var write;
	map7.forEach(function(item,index,arr){
	    if(num==index){
	    	write=item;
	    }
	});
	return write;
}

var education = new Map();
education.set("1", "高中生");
education.set("2", "中专生");
education.set("3", "社会青年");
education.set("4", "大专生");
education.set("5", "本科生");


var kind = new Map();
kind.set("1", "退伍军人");
kind.set("2", "在校大学生");
kind.set("3", "在校高中生");
kind.set("4", "社会青年");



function mapred(num) {
    if (num > 0) {
        return "style='color:red'"
    }
}

//获取服务器时间
function getTime() {
    var date = new Date();
    //年
    var year = date.getFullYear();
    //月
    var month = date.getMonth() + 1;
    month = month < 10 ? "0" + month : month;
    //日
    var day = date.getDate();
    day = day < 10 ? "0" + day : day;
    //时
    var hh = date.getHours();
    hh = hh < 10 ? "0" + hh : hh;
    //分
    var mm = date.getMinutes();
    mm = mm < 10 ? "0" + mm : mm;
    //秒
    var ss = date.getSeconds();
    ss = ss < 10 ? "0" + ss : ss;
    var rq = year + "年" + month + "月" + day + "日" + " " + hh + ":" + mm + ":" + ss;
    return rq;
}


/*设置修改时的元素*/
function setValue(name, event, val) {
    $("input[name='" + name + "']").val($(event).parent().siblings()[val].innerText);
}

function setVal(name, vall) {
    $("input[name='" + name + "']").val(vall);

}

function getVal(name) {
    return $.trim($("input[name='" + name + "']").val());
}

function stetVal(name, vall) {
    $("textarea[name='" + name + "']").val(vall);

}

function gtetVal(name) {
    return $.trim($("textarea[name='" + name + "']").val());
}

function batch(checkStatus) {
    var checkQuery = [];
    for (let i = 0; i < checkStatus.data.length; i++) {
        checkQuery.push(checkStatus.data[i].id);
    }
    return checkQuery.join(',');
}

